package restaurant;

/**
 * The Command object to add a comment.
 * 
 * @author Ebonie
 */

public class cmdAddComment implements Command
{

	/** The info. */
	private InformationAggregator info;

	/** The comment. */
	private String comment;



	/**
	 * Instantiates a new cmd add comment.
	 * 
	 * @param info the info
	 * @param comment the comment
	 */
	public cmdAddComment(InformationAggregator info, String comment) {
		this.info = info;
		this.comment = comment;
	}



	/**
	 * Execute.
	 * 
	 * @return the object
	 * @see restaurant.Command#execute()
	 */
	@Override
	public Object execute()
	{
		CustomerComments comments = info.getComments();
		Comment c = comments.addComment(comment);
		
		return c;
	}

}
